package com.quanxi.qxaimain;

import com.quanxi.qxaimain.service.demoImpl;
import com.quanxi.qxaimain.service.demoserver;
import lombok.SneakyThrows;
import net.sf.json.JSONArray;

import java.io.*;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
 * @Author lyx
 * @create 2022/9/30 15:23
 */
public class test1 {
    public static void main(String[] args) throws InterruptedException, IOException {

        String sql_result="[{TEST=98489446.31}]";

        try {
            JSONArray jsonArray = JSONArray.fromObject(sql_result);

            System.out.println(jsonArray);
            List<Map<String,Object>> mapList=(List)jsonArray;
            Map<String, Object> map = mapList.get(0);
            Iterator it = map.entrySet().iterator() ;
            while (it.hasNext())
            {
                Map.Entry entry = (Map.Entry) it.next() ;
                Object key = entry.getKey() ;
                Object value = entry.getValue() ;
                System.out.println(value.toString());

            }
        }
        catch (Exception e){

        }
        String sjiachun = "9.8489448E7";
        BigDecimal db = new BigDecimal(sjiachun);
        String ii = db.toPlainString();
        System.out.println(ii);


    }



    }
